home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc1_2_x / inptmthd.sit / Input Methods / card_5176.txt < prev    next >
Text File  |  1989-11-24  |  8KB  |  374 lines

  1. -- card: 5176 from stack: in
  2. -- bmap block id: 5800
  3. -- flags: 0000
  4. -- background id: 2696
  5. -- name: Matching
  6. ----- HyperTalk script -----
  7. on closeCard
  8.   -- put the original picture back and unhilite the buttons
  9.   -- CAUTION!  If you make changes to the picture, choose "Keep" before
  10.   -- leaving the card or your changes will be lost if this handler runs!
  11.   global matchCleanUp
  12.   if matchCleanUp is empty then pass closeCard  -- nothing to clean up
  13.   lock screen
  14.   choose select tool
  15.   doMenu "Revert"
  16.   choose browse tool
  17.   repeat with b = 1 to the number of buttons
  18.     set hilite of card button b to false
  19.   end repeat
  20.   put empty into matchCleanUp
  21.   pass closeCard
  22. end closeCard
  23.  
  24. --ΓÇöΓÇöΓÇöΓÇöΓÇöΓÇöΓÇö--
  25. -- Match --
  26. --ΓÇöΓÇöΓÇöΓÇöΓÇöΓÇöΓÇö--
  27. -- created by Jim Taylor  11/89
  28. -- Microcomputer Support for Curriculum
  29. -- 101 HRCB, Brigham Young University, Provo, UT 84602  (801)378-6446
  30. -- taylorj@byuvax.bitnet
  31. --
  32. -- This code has been released into the public domain.
  33. --
  34. on match whatToMatch
  35.   global matchCleanUp
  36.   if hilite of the target then  --already matched
  37.     beep
  38.     exit match
  39.   end if
  40.   set the hilite of target to true
  41.   wait until the mouseClick
  42.   if the mouseLoc is within rect of card button whatToMatch then --matched
  43.     set the hilite of card button whatToMatch to true
  44.     repeat 2 times  --flash the buttons
  45.       flashButton the short name of target
  46.       flashButton whatToMatch
  47.     end repeat
  48.     choose line tool  --draw line connecting buttons
  49.     set the lineSize to 2
  50.     set the dragSpeed to 500
  51.     drag from loc of target to loc of card button whatToMatch
  52.     choose browse tool
  53.     play short name of target  -- speak the names
  54.     play whatToMatch
  55.     wait until the sound is "done"
  56.     put "true" into matchCleanUp  -- need to clean up when done
  57.   else  --didn't match
  58.     beep
  59.     set the hilite of target to false
  60.   end if
  61. end match
  62.  
  63. on flashButton buttonName
  64.   repeat 6 times
  65.     set the hilite of card button buttonName to not the hilite of card button buttonName
  66.   end repeat
  67. end flashButton
  68.  
  69.  
  70.  
  71.  
  72. -- part 1 (button)
  73. -- low flags: 00
  74. -- high flags: 8003
  75. -- rect: left=20 top=59 right=81 bottom=113
  76. -- title width / last selected line: 0
  77. -- icon id / first selected line: 0 / 0
  78. -- text alignment: 1
  79. -- font id: 0
  80. -- text size: 12
  81. -- style flags: 0
  82. -- line height: 16
  83. -- part name: Oregon
  84. ----- HyperTalk script -----
  85. on mouseUp
  86.   match "Salem"
  87. end mouseUp
  88.  
  89.  
  90.  
  91. -- part 2 (button)
  92. -- low flags: 00
  93. -- high flags: 8003
  94. -- rect: left=83 top=123 right=145 bottom=168
  95. -- title width / last selected line: 0
  96. -- icon id / first selected line: 0 / 0
  97. -- text alignment: 1
  98. -- font id: 0
  99. -- text size: 12
  100. -- style flags: 0
  101. -- line height: 16
  102. -- part name: Vermont
  103. ----- HyperTalk script -----
  104. on mouseUp
  105.   match "Montpelier"
  106. end mouseUp
  107.  
  108.  
  109.  
  110. -- part 3 (button)
  111. -- low flags: 00
  112. -- high flags: 8003
  113. -- rect: left=24 top=174 right=196 bottom=101
  114. -- title width / last selected line: 0
  115. -- icon id / first selected line: 0 / 0
  116. -- text alignment: 1
  117. -- font id: 0
  118. -- text size: 12
  119. -- style flags: 0
  120. -- line height: 16
  121. -- part name: Salem
  122. ----- HyperTalk script -----
  123. on mouseUp
  124.   match "Oregon"
  125. end mouseUp
  126.  
  127.  
  128.  
  129. -- part 4 (button)
  130. -- low flags: 00
  131. -- high flags: 8003
  132. -- rect: left=131 top=290 right=312 bottom=220
  133. -- title width / last selected line: 0
  134. -- icon id / first selected line: 0 / 0
  135. -- text alignment: 1
  136. -- font id: 0
  137. -- text size: 12
  138. -- style flags: 0
  139. -- line height: 16
  140. -- part name: Montpelier
  141. ----- HyperTalk script -----
  142. on mouseUp
  143.   match "Vermont"
  144. end mouseUp
  145.  
  146.  
  147.  
  148. -- part 5 (button)
  149. -- low flags: 00
  150. -- high flags: 0000
  151. -- rect: left=294 top=61 right=91 bottom=333
  152. -- title width / last selected line: 0
  153. -- icon id / first selected line: 0 / 0
  154. -- text alignment: 1
  155. -- font id: 0
  156. -- text size: 12
  157. -- style flags: 0
  158. -- line height: 16
  159. -- part name: Card
  160. ----- HyperTalk script -----
  161. on mouseUp
  162.   match "rolodex"
  163. end mouseUp
  164.  
  165.  
  166.  
  167. -- part 6 (button)
  168. -- low flags: 00
  169. -- high flags: 0000
  170. -- rect: left=413 top=253 right=293 bottom=460
  171. -- title width / last selected line: 0
  172. -- icon id / first selected line: 0 / 0
  173. -- text alignment: 1
  174. -- font id: 0
  175. -- text size: 12
  176. -- style flags: 0
  177. -- line height: 16
  178. -- part name: Rolodex
  179. ----- HyperTalk script -----
  180. on mouseUp
  181.   match "card"
  182. end mouseUp
  183.  
  184.  
  185.  
  186. -- part 7 (button)
  187. -- low flags: 00
  188. -- high flags: 0000
  189. -- rect: left=298 top=125 right=169 bottom=348
  190. -- title width / last selected line: 0
  191. -- icon id / first selected line: 0 / 0
  192. -- text alignment: 1
  193. -- font id: 0
  194. -- text size: 12
  195. -- style flags: 0
  196. -- line height: 16
  197. -- part name: Cloud
  198. ----- HyperTalk script -----
  199. on mouseUp
  200.   match "rain"
  201. end mouseUp
  202.  
  203.  
  204.  
  205. -- part 8 (button)
  206. -- low flags: 00
  207. -- high flags: 0000
  208. -- rect: left=319 top=263 right=317 bottom=373
  209. -- title width / last selected line: 0
  210. -- icon id / first selected line: 0 / 0
  211. -- text alignment: 1
  212. -- font id: 0
  213. -- text size: 12
  214. -- style flags: 0
  215. -- line height: 16
  216. -- part name: Rain
  217. ----- HyperTalk script -----
  218. on mouseUp
  219.   match "cloud"
  220. end mouseUp
  221.  
  222.  
  223.  
  224. -- part 9 (button)
  225. -- low flags: 00
  226. -- high flags: 0000
  227. -- rect: left=281 top=218 right=250 bottom=314
  228. -- title width / last selected line: 0
  229. -- icon id / first selected line: 0 / 0
  230. -- text alignment: 1
  231. -- font id: 0
  232. -- text size: 12
  233. -- style flags: 0
  234. -- line height: 16
  235. -- part name: Clubs
  236. ----- HyperTalk script -----
  237. on mouseUp
  238.   match "spades"
  239. end mouseUp
  240.  
  241.  
  242.  
  243. -- part 10 (button)
  244. -- low flags: 00
  245. -- high flags: 0000
  246. -- rect: left=388 top=114 right=146 bottom=421
  247. -- title width / last selected line: 0
  248. -- icon id / first selected line: 0 / 0
  249. -- text alignment: 1
  250. -- font id: 0
  251. -- text size: 12
  252. -- style flags: 0
  253. -- line height: 16
  254. -- part name: Spades
  255. ----- HyperTalk script -----
  256. on mouseUp
  257.   match "clubs"
  258. end mouseUp
  259.  
  260.  
  261.  
  262. -- part 11 (button)
  263. -- low flags: 00
  264. -- high flags: 0000
  265. -- rect: left=349 top=194 right=233 bottom=401
  266. -- title width / last selected line: 0
  267. -- icon id / first selected line: 0 / 0
  268. -- text alignment: 1
  269. -- font id: 0
  270. -- text size: 12
  271. -- style flags: 0
  272. -- line height: 16
  273. -- part name: Letter
  274. ----- HyperTalk script -----
  275. on mouseUp
  276.   match "mailbox"
  277. end mouseUp
  278.  
  279.  
  280.  
  281. -- part 12 (button)
  282. -- low flags: 00
  283. -- high flags: 0000
  284. -- rect: left=450 top=73 right=116 bottom=489
  285. -- title width / last selected line: 0
  286. -- icon id / first selected line: 0 / 0
  287. -- text alignment: 1
  288. -- font id: 0
  289. -- text size: 12
  290. -- style flags: 0
  291. -- line height: 16
  292. -- part name: Mailbox
  293. ----- HyperTalk script -----
  294. on mouseUp
  295.   match "letter"
  296. end mouseUp
  297.  
  298.  
  299.  
  300. -- part 13 (button)
  301. -- low flags: 00
  302. -- high flags: 8003
  303. -- rect: left=71 top=224 right=246 bottom=150
  304. -- title width / last selected line: 0
  305. -- icon id / first selected line: 0 / 0
  306. -- text alignment: 1
  307. -- font id: 0
  308. -- text size: 12
  309. -- style flags: 0
  310. -- line height: 16
  311. -- part name: Trenton
  312. ----- HyperTalk script -----
  313. on mouseUp
  314.   match "New Jersey"
  315. end mouseUp
  316.  
  317.  
  318.  
  319. -- part 14 (button)
  320. -- low flags: 00
  321. -- high flags: 8003
  322. -- rect: left=142 top=173 right=195 bottom=239
  323. -- title width / last selected line: 0
  324. -- icon id / first selected line: 0 / 0
  325. -- text alignment: 1
  326. -- font id: 0
  327. -- text size: 12
  328. -- style flags: 0
  329. -- line height: 16
  330. -- part name: New Jersey
  331. ----- HyperTalk script -----
  332. on mouseUp
  333.   match "Trenton"
  334. end mouseUp
  335.  
  336.  
  337.  
  338. -- part 15 (button)
  339. -- low flags: 00
  340. -- high flags: 8003
  341. -- rect: left=135 top=77 right=99 bottom=220
  342. -- title width / last selected line: 0
  343. -- icon id / first selected line: 0 / 0
  344. -- text alignment: 1
  345. -- font id: 0
  346. -- text size: 12
  347. -- style flags: 0
  348. -- line height: 16
  349. -- part name: Helena
  350. ----- HyperTalk script -----
  351. on mouseUp
  352.   match "Montana"
  353. end mouseUp
  354.  
  355.  
  356.  
  357. -- part 16 (button)
  358. -- low flags: 00
  359. -- high flags: 8003
  360. -- rect: left=12 top=267 right=289 bottom=97
  361. -- title width / last selected line: 0
  362. -- icon id / first selected line: 0 / 0
  363. -- text alignment: 1
  364. -- font id: 0
  365. -- text size: 12
  366. -- style flags: 0
  367. -- line height: 16
  368. -- part name: Montana
  369. ----- HyperTalk script -----
  370. on mouseUp
  371.   match "Helena"
  372. end mouseUp
  373.  
  374.